package com.bl.student.dao.repository;

import com.bl.student.dao.model.PurchaseEntity;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.PagingAndSortingRepository;

/**
 * Created by liangweikang on 18/1/30.
 */
public interface PurchaseRepository extends PagingAndSortingRepository<PurchaseEntity, String> {

    Page<PurchaseEntity> findByUserIdEqualsOrderByCreateTime(String userId, Pageable pageable);

    Page<PurchaseEntity> findAllByOrderByCreateTimeDesc(Pageable pageable);

}
